package com.wangyadong.hobby.schedule.jobtask.ath.lesson1.stackqueue;

/**
 * <p>
 *
 * @author <714037465@qq.com>
 * @since 2019/4/1715:52
 **/
public class IntegerExample {

    public static void main(String[] args) {
//        Integer a = null;
//        int b = a;
//        System.out.println(b);
        //

        Integer a1 = 100;
        Integer a2 = 100;
        System.out.println(a1 == a2);   // true
        System.out.println(a1.hashCode() + "  " + a2.hashCode());
        Integer b1 = new Integer(100);
        Integer b2 = new Integer(100);
        System.out.println(b1 == b2);   // false

        Integer c1 = 150;
        Integer c2 = 150;
        System.out.println(c1 == c2);   // false


        Integer d1 = new Integer(52);
        Integer d2 = new Integer(52);
        System.out.println(d1 == d2);   // false

        System.out.println(Integer.MIN_VALUE - 1);
        System.out.println(Integer.MIN_VALUE);
        System.out.println(Integer.MAX_VALUE + 1);
        System.out.println(Integer.MAX_VALUE);
    }

}
